<%@page import="com.manager.car.po.AutoPartsInfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
	<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/xiaogemsg.js"></script>
	<style>
		body{
			margin: 0px;
			padding: 0px;
		}
		.right-shang{
			height: 160px;
			margin-top: 50px;
			text-align: center;
			border: 0px solid red;
		}
		.rignt-nav-img {
			width: 120px;
			height: 120px;
			margin-top: 3%;
			border-radius: 50%;
			text-align: center;
		}
		.top-title{
			height: 50px;
			width: 100%;
			border: 1px solid #FAEBCC;
			background-color: #FAEBCC;
			position: fixed;
		}
		.top-title-p-font{
			color: #FF8800;
			font-family: '华文行楷';
			font-size: 32px;
		}
		.bottom-xia{
			width: 100%;
			height: 640px;
			border-radius: 5px;
			border: 1px solid gainsboro;
			position: relative;
			
		}
		input{
			height:35px;
			width:100%;
			border: 0px solid red;
			border-radius: 5px;
		}
		.headrImg{
			height: 40px;
			width: 80%;
			margin-left: 10.01%;
			text-align: center;
			border: 1px solid black;
			padding:3px;
			border-bottom: 0px;
		}
	</style>
	<script type="text/javascript" src="js/xiaogefileupload.js"></script>
	<script src="laydate/laydate.js"></script> <!-- 改成你的路径 -->
	<script>
	lay('#version').jsp('-v'+ laydate.v);
	
	//执行一个laydate实例
	laydate.render({
	  elem: '#userDataBirthday' //指定元素
	});
	</script>
	<script>
		//验证
		$(function(){
			//昵称
			$("#autoName").blur(function(){
				if($(this).val()==null || $(this).val()==""){
					$(this).attr("style","border: 1px solid red;");
				}else{
					$(this).attr("style","border: 0px solid red;");
				}
			});
			
		});
	</script>
	</head>
<body>
	<div class="bottom-xia">
		<form action="apiinfoAction!upda?id=${api.autoId }" method="post"  enctype="multipart/form-data">
			<table align="center" cellpadding="3" cellspacing="3"  width="80%">
				<tr height="40px">
					<th style="font-size: 14px;">
						产品名称：
					</th>
					<td>
						<span  style="font-size: 12px;">
							<input type="text" placeholder="*请输入名称" value="${api.autoName }"  id="autoName" name="autoName">
						</span>
					</td>
					<th style="font-size: 14px;">
						产品价格:
					</th>
					<td>
						<input placeholder="*请输入价格" value="${api.autoprice }" id="autoprice" name="autoprice">
					</td>
				</tr>
				<tr height="40px">
					<th style="font-size: 14px;">
						产品订量：
					</th>
					<td>
						<span  style="font-size: 12px;">
							<input placeholder="*产品订量" value="${api.autonum }" id="autonum" name="autonum">
						</span>
					</td>
					<th style="font-size: 14px;">
						适用车型：
					</th>
					<td>
						<span  style="font-size: 12px;">
							<input placeholder="*请输入适用车型" value="${api.autotype }" id="autotype" name="autotype">
						</span>
					</td>
				</tr>
				<tr height="40px">
					<th style="font-size: 14px;">
						是否发票：
					</th>
					<td>
						<span  style="font-size: 12px;">
						<%AutoPartsInfo api=(AutoPartsInfo)request.getAttribute("api"); %>
							<input type="radio" id="autofa" value="是" <%if(api.getAutofa().equals("是")){ %>checked="checked"<%} %> name="autofa" style="width: 30%;height: 15px;">是
							<input type="radio" id="autofa" value="否" <%if(api.getAutofa().equals("否")){ %>checked="checked"<%} %> name="autofa" style="width: 30%;height: 15px;">否
						</span>
					</td>
					<th style="font-size: 14px;">
						是否保修：
					</th>
					<td>
						<span  style="font-size: 12px;">
							<input type="radio" id="autoxiu" value="是" <%if(api.getAutoxiu().equals("是")){ %>checked="checked"<%} %> name="autoxiu" style="width: 30%;height: 15px;">是
							<input type="radio" id="autoxiu" value="否" <%if(api.getAutoxiu().equals("否")){ %>checked="checked"<%} %> name="autoxiu" style="width: 30%;height: 15px;">否
						</span>
					</td>
				</tr>
				<tr height="40px">
					<th style="font-size: 14px;">
						类型属性:
					</th>
					<td style="font-size: 12px;">
						<select class="form-control" name="autoPro">
						<option >${api.autoPro }</option>
			<option >发动机</option>
			<option>车身附件</option>
			<option >底盘</option>
			<option>电子电气</option>
			<option>维修保养</option>
		</select>
					</td>
					<th style="font-size: 14px;">
						图片路径:
					</th>
					<td style="font-size: 14px;">
						<span  style="font-size: 12px;">
							<input type="file" name="autoImg" value="${api.autoImg }">
						</span>
					</td>
				</tr> 
				<tr height="40px">
					<th style="font-size: 14px;"> 
						产品介绍：
					</th>
					<td colspan="3">
						<span  style="font-size: 12px;">
							<input placeholder="*请输入产品介绍" value="${api.autoJie }" id="autoJie" name="autoJie">
						</span>
					</td>
					</tr>
					<tr>
						<th style="font-size: 14px;">
							产品详情：
						</th>
						<td colspan="3">
							
								<!-- 配置文件 -->
								<script type="text/javascript"
									src="../utf8-jsp/ueditor.config.js">									
								</script>
								<!-- 编辑器源码文件 -->
								<script type="text/javascript" src="../utf8-jsp/ueditor.all.js">
									
								</script>
								<!-- 加载编辑器的容器 -->
								<textarea name="autoRemark" style="width: 100%; height: 280px"
									id="a">${api.autoRemark }</textarea>
								<!-- 实例化编辑器 -->
								<script type="text/javascript">
									var ue1 = UE.getEditor('a', {
										toolbars : [ [ 'undo', //撤销
										'redo', //重做
										'bold', //加粗
										'indent', //首行缩进
										'snapscreen', //截图
										'italic', //斜体
										'underline', //下划线
										'forecolor', //字体颜色
										'backcolor', //背景色
										'fontfamily', //字体
										'justifyleft', //居左对齐
										'justifyright', //居右对齐
										'justifycenter', //居中对齐 
										'fontsize', //字号
										] ]
									});
								</script>
							
						</td>
					</tr>
					
					<tr height="40px">
						<th colspan="2" width="50%">
				       		<div style="width:50%;margin-left: 25%;">
								<button type="submit" class="btn btn-primary btn-lg btn-block">
									修改
								</button>
							</div>
						</th>
						<th colspan="2">
						<script type="text/javascript">
							function can() {
								window.location.href = "apiinfoAction!selectHtPage?ye=1";
							}
						</script>
							<div style="width:50%;margin-left: 25%;">
								<button type="button" id="cancel"  onclick="can()" class="btn btn-danger btn-lg btn-block">
									取消
								</button>
							</div>
						</th>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>